import React, { Component } from 'react'
import axios from 'axios';
import './rightTop.scss';


export default class RightTop extends Component {
    state={
        data:[],
        indicator:[],
        option:{
            radar:[
                {
                    indicator: [
                        {name: '食物',max: 1000},
                        {name: '娱乐',max: 1000},
                        {name: '运动',max: 1000},
                        {name: '家居',max: 1000},
                        {name: '机械',max: 1000},
                        {name: '学习',max: 1000},
                    ],
                    radius: 80
                }
            ],
            series:[
                {
                    type:'radar',
                    areaStyle: {},
                    data: [
                        {value:[782, 621.2, 322.1, 525.3, 265, 224]}
                    ],
                }
            ]
        }
    }
    componentDidMount(){
        axios.get('/api/rightPageData').then(res=>{
            this.setState({
                data:res.data.browseCategories.data,
                indicator:res.data.browseCategories.indicator,
            })
        })
    }
    render() {
        // console.log(this.state.data);
        // console.log(this.state.indicator)
        return (
            <div className='rightTop'>
                {/* 右边的上面 */}
                {/* echars中自定义雷达 */}
                <div className='title'>
                    <i className='iconfont icon-application'></i>
                    <label>关联数据类别分布</label>    
                </div>
                <div className='con'>
                    <div className='left'>

                    </div>
                </div>
            </div>
        )
    }
}
